package com.google.jessewilson.codesearch.ui;

import com.google.jessewilson.codesearch.api.CodeFile;
import com.google.jessewilson.codesearch.api.Line;
import com.google.jessewilson.codesearch.api.QueryResponse;

import javax.swing.*;
import java.util.List;

/**
 * Provide all actions for a specified file and line.
 *
 * @author jessewilson
 */
public interface ResultActionsProvider {

  /**
   * @param codeFile the non-null file to open
   * @param line a specific line within the file if available, or {@code null}
   * @param results
   */
  List<Action> actions(CodeFile codeFile, Line line, QueryResponse results);

  /**
   * @param codeFile the non-null file to open
   * @param line a specific line within the file if available, or {@code null}
   *      for no line in particular.
   */
  void doDefaultAction(CodeFile codeFile, Line line, QueryResponse results);

  
}
